//
// Created by fang.junpeng on 2017/6/7.
//

#include "dolphin.h"
#include "PyObj.h"
#include <string>
#include <memory>

#ifndef CPYTHON_PYENGINE_H
#define CPYTHON_PYENGINE_H

namespace dolphin{
    /**
     * Python Runtime Control
     * High level Embedding of Python
     */
    struct PyRuntime:public nocopyable{
        PyRuntime();
        ~PyRuntime();
        /**
         * run python
         */
        void runPyString(std::string pyStr);
        void runPyFile(std::string filename);
        /**
         * add python path
         */
        void add_path(std::string path);
    };

    /**
     * Module class for Python
     */
    struct PyModule:public PyObj{
        PyModule(){}
        PyModule(std::string module_name);
        /**
         * import a python module
         */
        void Import(std::string module_name);
        PyObj get_Attr(std::string attr);
    };

    struct PyTuple:public PyObj{
        PyTuple(size_t size);
        void set_item(size_t index, PyObj& obj);
    private:
        size_t _size;
    };

    struct PyDict:public PyObj{
    };

}

#endif //CPYTHON_PYENGINE_H
